notebook: Fix crash when dragging a tab
authorTimm Bäder <mail@baedert.org>
Wed, 3 May 2017 09:21:29 +0000 (11:21 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:11 +0000 (21:27 -0400)
gtk_gesture_get_last_event can return NULL, so guard against that.

gtk/gtknotebook.c

index e9223e0996899b4d513ed4428a835df798175c6f..9073f81b14ca6131505b1f567754c7da22957925 100644 (file)
@@ -2786,6 +2786,9 @@ gtk_notebook_gesture_released (GtkGestureMultiPress *gesture,
   button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
   event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
 
+  if (!event)
+    return;
+
   if (event->type != GDK_BUTTON_RELEASE)
     return;